<?php
class AppModel extends Model { 
	
	function __construct($id=false, $table=null, $ds=null) { 
	    App::import('Component', 'Session');
	    $session = new SessionComponent();
	    if(!empty($_POST['aplicacion'])) {
	    	$session->write('aplicacion', $_POST['aplicacion']);	    	
	    } 
	    $this->useDbConfig = $session->read('aplicacion');
		parent::__construct($id, $table, $ds);	     
	}
}

?>